package com.yubest.designpattern.behavior.template;

/**
 * 制作饮料
 *
 * @Author: hweiyu
 * @Date: 2022/10/26 16:36
 */
public abstract class Beverage {

    public void make() {
        //烧水
        boilWater();
        //准备饮料包
        brew();
        //将饮料包倒入杯中
        pourInCup();
        //加佐料
        addCondiments();
    }

    abstract void brew();

    abstract void addCondiments();

    void boilWater() {
        System.out.println("boil water");
    }

    void pourInCup() {
        System.out.println("pour in cup");
    }
}
